package com.dosen.api.third.party.cmp.model.hostinfo;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Objects;

/**
 * @version V1.0
 * @author: guangcheng
 * @date: 2023/1/13 9:17
 * @description:
 */
@NoArgsConstructor
@Data
public class CmpHost {

    /**
     * gmtCreate
     */
    @JSONField(name = "gmtCreate")
    public String gmtCreate;
    /**
     * gmtModify
     */
    @JSONField(name = "gmtModify")
    public String gmtModify;
    /**
     * creatorId
     */
    @JSONField(name = "creatorId")
    public Integer creatorId;
    /**
     * ownerId
     */
    @JSONField(name = "ownerId")
    public Object ownerId;
    /**
     * menderId
     */
    @JSONField(name = "menderId")
    public Integer menderId;
    /**
     * name
     */
    @JSONField(name = "name")
    public String name;
    /**
     * status
     */
    @JSONField(name = "status")
    public String status;
    /**
     * deleted
     */
    @JSONField(name = "deleted")
    public Boolean deleted;
    /**
     * props
     */
    @JSONField(name = "props")
    public Object props;
    /**
     * remark
     */
    @JSONField(name = "remark")
    public Object remark;
    /**
     * id
     */
    @JSONField(name = "id")
    public Integer id;
    /**
     * expiredTime
     */
    @JSONField(name = "expiredTime")
    public Object expiredTime;
    /**
     * assetCategory
     */
    @JSONField(name = "assetCategory")
    public String assetCategory;
    /**
     * category
     */
    @JSONField(name = "category")
    public String category;
    /**
     * catalog
     */
    @JSONField(name = "catalog")
    public String catalog;
    /**
     * uuid
     */
    @JSONField(name = "uuid")
    public String uuid;
    /**
     * manageIp
     */
    @JSONField(name = "manageIp")
    public String manageIp;
    /**
     * dcId
     */
    @JSONField(name = "dcId")
    public Object dcId;
    /**
     * roomId
     */
    @JSONField(name = "roomId")
    public Object roomId;
    /**
     * rackId
     */
    @JSONField(name = "rackId")
    public Object rackId;
    /**
     * hostname
     */
    @JSONField(name = "hostname")
    public Object hostname;
    /**
     * serviceIp
     */
    @JSONField(name = "serviceIp")
    public Object serviceIp;
    /**
     * tenantId
     */
    @JSONField(name = "tenantId")
    public Object tenantId;
    /**
     * vendorId
     */
    @JSONField(name = "vendorId")
    public Integer vendorId;
    /**
     * connected
     */
    @JSONField(name = "connected")
    public Boolean connected;
    /**
     * maintained
     */
    @JSONField(name = "maintained")
    public Boolean maintained;
    /**
     * ipv6Enabled
     */
    @JSONField(name = "ipv6Enabled")
    public Boolean ipv6Enabled;
    /**
     * powerState
     */
    @JSONField(name = "powerState")
    public String powerState;
    /**
     * clusterId
     */
    @JSONField(name = "clusterId")
    public Object clusterId;
    /**
     * vdcId
     */
    @JSONField(name = "vdcId")
    public Integer vdcId;
    /**
     * resourceId
     */
    @JSONField(name = "resourceId")
    public String resourceId;
    /**
     * accurated
     */
    @JSONField(name = "accurated")
    public Boolean accurated;
    /**
     * rootDiskId
     */
    @JSONField(name = "rootDiskId")
    public Object rootDiskId;
    /**
     * cpuModel
     */
    @JSONField(name = "cpuModel")
    public String cpuModel;
    /**
     * modelName
     */
    @JSONField(name = "modelName")
    public Object modelName;
    /**
     * osCategory
     */
    @JSONField(name = "osCategory")
    public String osCategory;
    /**
     * os
     */
    @JSONField(name = "os")
    public Object os;
    /**
     * resourceGroup
     */
    @JSONField(name = "resourceGroup")
    public Object resourceGroup;
    /**
     * vmotionIp
     */
    @JSONField(name = "vmotionIp")
    public Object vmotionIp;
    /**
     * exporterInstalled
     */
    @JSONField(name = "exporterInstalled")
    public Object exporterInstalled;
    /**
     * resourceGroupName
     */
    @JSONField(name = "resourceGroupName")
    public Object resourceGroupName;
    /**
     * vendorName
     */
    @JSONField(name = "vendorName")
    public String vendorName;
    /**
     * vendorType
     */
    @JSONField(name = "vendorType")
    public String vendorType;
    /**
     * roomname
     */
    @JSONField(name = "roomname")
    public Object roomname;
    /**
     * rackname
     */
    @JSONField(name = "rackname")
    public Object rackname;
    /**
     * dcname
     */
    @JSONField(name = "dcname")
    public Object dcname;
    /**
     * clusterName
     */
    @JSONField(name = "clusterName")
    public Object clusterName;
    /**
     * vdcName
     */
    @JSONField(name = "vdcName")
    public String vdcName;
    /**
     * stores
     */
    @JSONField(name = "stores")
    public Object stores;
    /**
     * netcards
     */
    @JSONField(name = "netcards")
    public Object netcards;
    /**
     * networks
     */
    @JSONField(name = "networks")
    public Object networks;
    /**
     * servers
     */
    @JSONField(name = "servers")
    public Object servers;
    /**
     * dataStores
     */
    @JSONField(name = "dataStores")
    public Object dataStores;
    /**
     * vmNum
     */
    @JSONField(name = "vmNum")
    public Integer vmNum;
    /**
     * templateNum
     */
    @JSONField(name = "templateNum")
    public Integer templateNum;
    /**
     * datastoreNum
     */
    @JSONField(name = "datastoreNum")
    public Object datastoreNum;
    /**
     * config
     */
    @JSONField(name = "config")
    public HostConfig config;
    /**
     * assets
     */
    @JSONField(name = "assets")
    public Object assets;
    /**
     * switchers
     */
    @JSONField(name = "switchers")
    public Object switchers;
    /**
     * guid
     */
    @JSONField(name = "guid")
    public String guid;
    /**
     * storeHosts
     */
    @JSONField(name = "storeHosts")
    public Object storeHosts;
    /**
     * powervcHmcs
     */
    @JSONField(name = "powervcHmcs")
    public Object powervcHmcs;
    /**
     * instance
     */
    @JSONField(name = "instance")
    public Object instance;
    /**
     * alarms
     */
    @JSONField(name = "alarms")
    public List<?> alarms;
    /**
     * serverPci
     */
    @JSONField(name = "serverPci")
    public Object serverPci;
    /**
     * raids
     */
    @JSONField(name = "raids")
    public Object raids;
    /**
     * rackhdNodeId
     */
    @JSONField(name = "rackhdNodeId")
    public Object rackhdNodeId;
    /**
     * imageId
     */
    @JSONField(name = "imageId")
    public Object imageId;
    /**
     * imageName
     */
    @JSONField(name = "imageName")
    public Object imageName;
    /**
     * imageIsoName
     */
    @JSONField(name = "imageIsoName")
    public Object imageIsoName;
    /**
     * discoverTime
     */
    @JSONField(name = "discoverTime")
    public Object discoverTime;
    /**
     * discovered
     */
    @JSONField(name = "discovered")
    public Object discovered;
    /**
     * identifier
     */
    @JSONField(name = "identifier")
    public Object identifier;
    /**
     * role
     */
    @JSONField(name = "role")
    public Object role;
    /**
     * services
     */
    @JSONField(name = "services")
    public Object services;
    /**
     * clockDiff
     */
    @JSONField(name = "clockDiff")
    public Object clockDiff;
    /**
     * resourceLabel
     */
    @JSONField(name = "resourceLabel")
    public Object resourceLabel;
    /**
     * reboot
     */
    @JSONField(name = "reboot")
    public Object reboot;
    /**
     * cpuDistributable
     */
    @JSONField(name = "cpuDistributable")
    public Object cpuDistributable;
    /**
     * memDistributable
     */
    @JSONField(name = "memDistributable")
    public Object memDistributable;
    /**
     * cpuRemainder
     */
    @JSONField(name = "cpuRemainder")
    public Object cpuRemainder;
    /**
     * memoryRemainder
     */
    @JSONField(name = "memoryRemainder")
    public Object memoryRemainder;
    /**
     * diskRemainder
     */
    @JSONField(name = "diskRemainder")
    public Object diskRemainder;
    /**
     * rootDisk
     */
    @JSONField(name = "rootDisk")
    public Object rootDisk;
    /**
     * diskCnt
     */
    @JSONField(name = "diskCnt")
    public Object diskCnt;
    /**
     * iqn
     */
    @JSONField(name = "iqn")
    public Object iqn;
    /**
     * roles
     */
    @JSONField(name = "roles")
    public Object roles;
    /**
     * alarm
     */
    @JSONField(name = "alarm")
    public Boolean alarm;
    /**
     * groupName
     */
    @JSONField(name = "groupName")
    public Object groupName;

    /**
     * 宿主机IP相同既是同一台机器
     *
     * @param o
     * @return
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CmpHost cmpHost = (CmpHost) o;
        return Objects.equals(manageIp, cmpHost.manageIp);
    }

    @Override
    public int hashCode() {
        return Objects.hash(manageIp);
    }

}

